package com.itheima.aop.annotation;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class MyAspect6 {
    @Around("@annotation(com.itheima.aop.annotation.MyLog)")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info("MyLog注解生效了：环绕通知开始");
        Object result = joinPoint.proceed();
        log.info("MyLog注解生效了：环绕通知结束");
        return result;
    }
}
